3.9 [LibraryClasses] Sections

These sections are optional.

Summary

Defines the [LibraryClasses] tag in the DEC files.

The [LibraryClasses] section maps the location, relative to the DEC file, of library ClassName to the header file for the library class specified by the ClassName.

ClassName entries listed in architectural sections are not permitted to be listed in the common architectural section.

The 'common' architecture modifier in a section tag must not be combined with other architecture type modifiers; doing so will result in a build break.

All paths must be relative to the directory that contains the DEC file. Use of absolute paths, or WORKSPACE relative paths is prohibited.

It is permissible to use a <MACROVAL> entry in this section provided the above rules are followed.

Each ClassName entry must be listed only once per section.

Prototype

<LibraryClasses> ::= "[LibraryClasses" [<com_attribs>] "]" <EOL> <LcEntries>*
<com_attribs>    ::= {".common"} {<attribs>}
<attribs>        ::= <attrs> ["," <TS> "LibraryClasses" <attrs>]*
<attrs>          ::= "." <arch>
<LcEntries>      ::= {<LcEntry>} {<MacroDefinition>}
<LcEntry>        ::= [<LcDoxygenHelp>]
                     <TS> <ClassName> <FS> <Filename> {<CommentBlock>} {<EOL>}
<LcDoxygenHelp>  ::= <TS> "##" <TS> "@LibraryClasses" <TS> <AsciiString> <EOL>
<ClassName>      ::= <ToolWord>
                     # A User Defined Keyword consisting of
                     # alphanumeric characters. No special
                     # characters are permitted.
<Filename>       ::= <PATH> <File> ".h"
<CommentBlock>   ::= <TS> "##" <TS> <ModuleTypeList>
                     {<Comment>} {<EOL>}

Parameters

Filename

Path portion of the header file statements in this section must be relative to the directory that contains the DEC file. Use of "..", "../" or "./" in the directory path is prohibited.

Restrictions

It is NOT permissible to list a Library Class entry under common and under a specific architecture. It is permissible to specify Library Class entries under all architectures except "common" if different header filename values are required for different architectures.

# Library Class Header section - list of Library Class header
# files that are provided by
# this package.
#
#######################################################################
[LibraryClasses.common]
  UefiRuntimeServicesTableLib |Include/Library/UefiRuntimeServicesTableLib.h
  UefiLib | Include/Library/UefiLib.h
  UefiDriverModelLib | Include/Library/UefiDriverModelLib.h
  UefiDriverEntryPoint | Include/Library/UefiDriverEntryPoint.h
  UefiDecompressLib | Include/Library/UefiDecompressLib.h
  UefiBootServicesTableLib | Include/Library/UefiBootServicesTableLib.h
  TimerLib|Include/Library/TimerLib.h
  SmbusLib|Include/Library/SmbusLib.h
  ResourcePublicationLib|Include/Library/ResourcePublicationLib.h
  PostCodeLib|Include/Library/PostCodeLib.h
  ReportStatusCodeLib|Include/Library/ReportStatusCodeLib.h
  PrintLib|Include/Library/PrintLib.h
  PerformanceLib|Include/Library/PerformanceLib.h
  PeiServicesTablePointerLib|Include/Library/PeiServicesTablePointerLib.h
  PeimEntryPoint|Include/Library/PeimEntryPoint.h
  PeiServicesLib|Include/Library/PeiServicesLib.h
  PeiCoreEntryPoint|Include/Library/PeiCoreEntryPoint.h
  PeCoffLib|Include/Library/PeCoffLib.h
  BaseLib|Include/Library/BaseLib.h

[LibraryClasses.IA32]
  UefiApplicationEntryPoint |Include/Library/UefiApplicationEntryPoint.h # UEFI_APPLICATION

[LibraryClasses.X64]
  UefiApplicationEntryPoint|Include/Library/UefiApplicationEntryPoint.h # UEFI_APPLICATION

[LibraryClasses.IPF]
  UefiApplicationEntryPoint|Include/Library/UefiApplicationEntryPoint.h # UEFI_APPLICATION

[LibraryClasses.EBC]
  UefiApplicationEntryPoint|Include/Library/UefiApplicationEntryPoint.h # UEFI_APPLICATION